﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using ManWebRole.Models;

namespace ManWebRole.Utilities
{
    public class SkySRMSqlMembershipProvider : SqlMembershipProvider
    {
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);
        }

        public bool ValidateUser(string username, string password, out Account user)
        {
            AccountModel model = new AccountModel();
            user = model.GetAccountByNamePassword(username, password);
            if (user != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

    }
}